home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import com.plus9.mockups.InputManager;
- import com.plus9.mockups.dialogs.BaseDialog;
- import flash.accessibility.*;
- import flash.data.*;
- import flash.debugger.*;
- import flash.desktop.*;
- import flash.display.*;
- import flash.errors.*;
- import flash.events.*;
- import flash.external.*;
- import flash.filesystem.*;
- import flash.filters.*;
- import flash.geom.*;
- import flash.html.*;
- import flash.html.script.*;
- import flash.media.*;
- import flash.net.*;
- import flash.printing.*;
- import flash.profiler.*;
- import flash.system.*;
- import flash.text.*;
- import flash.ui.*;
- import flash.utils.*;
- import flash.xml.*;
- import mx.binding.*;
- import mx.containers.Canvas;
- import mx.containers.ControlBar;
- import mx.controls.Button;
- import mx.controls.Text;
- import mx.core.UIComponentDescriptor;
- import mx.core.mx_internal;
- import mx.events.PropertyChangeEvent;
- import mx.styles.*;
-
- use namespace mx_internal;
-
- public class ConfirmationDialog extends BaseDialog implements IBindingClient
- {
- private static var _watcherSetupUtil:IWatcherSetupUtil;
-
- mx_internal var _bindingsByDestination:Object;
-
- mx_internal var _bindingsBeginWithWord:Object;
-
- private var _13255152dialogTitle:String;
-
- mx_internal var _watchers:Array;
-
- private var _94843_ok:Button;
-
- public var _ConfirmationDialog_Text1:Text;
-
- mx_internal var _bindings:Array;
-
- private var _documentDescriptor_:UIComponentDescriptor;
-
- private var _954925063message:String;
-
- public function ConfirmationDialog()
- {
- _documentDescriptor_ = new UIComponentDescriptor({
- "type":BaseDialog,
- "propertiesFactory":function():Object
- {
- return {
- "width":396,
- "height":226,
- "childDescriptors":[new UIComponentDescriptor({
- "type":Canvas,
- "stylesFactory":function():void
- {
- this.right = "10";
- this.bottom = "10";
- this.left = "10";
- this.top = "10";
- },
- "propertiesFactory":function():Object
- {
- return {"childDescriptors":[new UIComponentDescriptor({
- "type":Text,
- "id":"_ConfirmationDialog_Text1",
- "propertiesFactory":function():Object
- {
- return {
- "width":336,
- "selectable":true
- };
- }
- })]};
- }
- }),new UIComponentDescriptor({
- "type":ControlBar,
- "stylesFactory":function():void
- {
- this.horizontalAlign = "center";
- },
- "propertiesFactory":function():Object
- {
- return {"childDescriptors":[new UIComponentDescriptor({
- "type":Button,
- "id":"_ok",
- "events":{"click":"___ok_click"},
- "propertiesFactory":function():Object
- {
- return {"label":"OK"};
- }
- })]};
- }
- })]
- };
- }
- });
- mx_internal::_bindings = [];
- mx_internal::_watchers = [];
- mx_internal::_bindingsByDestination = {};
- mx_internal::_bindingsBeginWithWord = {};
- super();
- mx_internal::_document = this;
- this.width = 396;
- this.height = 226;
- }
-
- public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
- {
- ConfirmationDialog._watcherSetupUtil = param1;
- }
-
- public function set _ok(param1:Button) : void
- {
- var _loc2_:Object = this._94843_ok;
- if(_loc2_ !== param1)
- {
- this._94843_ok = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"_ok",_loc2_,param1));
- }
- }
-
- [Bindable(event="propertyChange")]
- public function get message() : String
- {
- return this._954925063message;
- }
-
- public function set message(param1:String) : void
- {
- var _loc2_:Object = this._954925063message;
- if(_loc2_ !== param1)
- {
- this._954925063message = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"message",_loc2_,param1));
- }
- }
-
- override public function initialize() : void
- {
- var bindings:Array;
- var watchers:Array;
- var i:uint;
- var target:ConfirmationDialog = null;
- var watcherSetupUtilClass:Object = null;
- mx_internal::setDocumentDescriptor(_documentDescriptor_);
- bindings = _ConfirmationDialog_bindingsSetup();
- watchers = [];
- target = this;
- if(_watcherSetupUtil == null)
- {
- watcherSetupUtilClass = getDefinitionByName("_ConfirmationDialogWatcherSetupUtil");
- watcherSetupUtilClass["init"](null);
- }
- _watcherSetupUtil.setup(this,function(param1:String):*
- {
- return target[param1];
- },bindings,watchers);
- i = 0;
- while(i < bindings.length)
- {
- Binding(bindings[i]).execute();
- i++;
- }
- mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
- mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
- super.initialize();
- }
-
- override public function closeYourself() : void
- {
- super.closeYourself();
- _ok.removeEventListener(MouseEvent.CLICK,onCancel);
- }
-
- private function _ConfirmationDialog_bindingExprs() : void
- {
- var _loc1_:* = undefined;
- _loc1_ = dialogTitle;
- _loc1_ = message;
- }
-
- [Bindable(event="propertyChange")]
- public function get _ok() : Button
- {
- return this._94843_ok;
- }
-
- public function set dialogTitle(param1:String) : void
- {
- var _loc2_:Object = this._13255152dialogTitle;
- if(_loc2_ !== param1)
- {
- this._13255152dialogTitle = param1;
- this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"dialogTitle",_loc2_,param1));
- }
- }
-
- public function ___ok_click(param1:MouseEvent) : void
- {
- onCancel();
- }
-
- override public function init(param1:InputManager) : void
- {
- super.init(param1);
- defaultButton = _ok;
- _ok.setFocus();
- }
-
- [Bindable(event="propertyChange")]
- public function get dialogTitle() : String
- {
- return this._13255152dialogTitle;
- }
-
- private function _ConfirmationDialog_bindingsSetup() : Array
- {
- var binding:Binding = null;
- var result:Array = [];
- binding = new Binding(this,function():String
- {
- var _loc1_:* = dialogTitle;
- return _loc1_ == undefined ? null : String(_loc1_);
- },function(param1:String):void
- {
- this.title = param1;
- },"this.title");
- result[0] = binding;
- binding = new Binding(this,function():String
- {
- var _loc1_:* = message;
- return _loc1_ == undefined ? null : String(_loc1_);
- },function(param1:String):void
- {
- _ConfirmationDialog_Text1.text = param1;
- },"_ConfirmationDialog_Text1.text");
- result[1] = binding;
- return result;
- }
- }
- }
-
-